﻿using System.Collections;
using System.Collections.Generic;
using System.Collections.Specialized;
using Central.Linq.Mvc;

namespace Central.Linq.MvcJson.Engine {

	public class PersonInfoManager : InfoManager {

		protected override List<FieldInformation> CreateFieldsList() {
			List<FieldInformation> fieldList = new List<FieldInformation>();
			fieldList.Add(new FieldInformation("Age", "Возраст", "Age", "ASC", 0, new AggregateFunction[] { AggregateFunction.Average, AggregateFunction.Max, AggregateFunction.Min, AggregateFunction.Sum }));
			fieldList.Add(new FieldInformation("MemberDate", "Дата", "MemberDate", "ASC", 0));
			fieldList.Add(new FieldInformation("Description", "Описание", "Description", "ASC", 1));
			fieldList.Add(new FieldInformation("Gender", "Пол", "Gender", "ASC", 1));
			fieldList.Add(new FieldInformation("IsMember", "Есть партбилет?", "IsMember", "ASC", 2));
			fieldList.Add(new FieldInformation("Name", "Наименование", "Name", "ASC", 1));
			fieldList.Add(new FieldInformation("Weight", "Вес", "Weight", "ASC", 0));

			StringDictionary countryEnumInfo = new StringDictionary();
			countryEnumInfo.Add("Enum", "SampleData.Country, SampleData");
			var f = new FieldInformation("Country", "Страна", "Country", "ASC", 3, countryEnumInfo);
			fieldList.Add(f);

			return fieldList;
		}
	}
}